
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;

import com.google.gson.Gson;

public class TestServerSocket {
	public static void main(String args[]) throws IOException {
		final int portNumber = 7;
		System.out.println("Creating server socket on port " + portNumber);
		ServerSocket serverSocket = new ServerSocket(portNumber);
		
		while (true) {
			Socket socket = serverSocket.accept();
			RequestHandler handler = new RequestHandler(socket);
			new Thread(handler).start();
		}
	}
}